﻿using System;
using System.Data;

using EFB.Lib;
using EFB.Lib.Entity;

namespace EFB.Lib.Repository {

    #region History
    /// <summary>
    /// Author     : Carlos Duarte - cebduarte@gmail.com
    /// Date       : 14/04/2012
    /// Description: Base class engine synchronization.
    /// </summary>
    #endregion
    public class BaseRepository {

        #region Attributes

        protected SqlHelper Sql = SqlHelper.Instance;

        #endregion

        #region SQL Attributes

        public void DatabaseConnect() {
            Sql.Open();
        }

        public void DatabaseDisconnect() {
            if (Sql != null) {
                Sql.Close();
            }
        }

        public void BeginTransaction() {
            Sql.BeginTransaction();
        }

        public void CommitTransaction() {
            Sql.Commit();
        }

        public void RollbackTransaction() {
            Sql.Rollback();
        }

        #endregion

        #region Methods


        #endregion

    }

}